<?php
class FzXmlView{
		
	public function GenerateFromRss($xml)
	{
		$xhtml = "<section>";
		$count = 0;
		foreach($xml->channel->item as $i)
		{
			$xhtml .= "
			<article>
			 	<div class='fb-like' data-href='http://www.projectunknown.se/xmlapp/index.php?controller=fzxmlapp".$i->title."' data-send='false' data-layout='button_count' data-width='100' data-show-faces='false' data-font='tahoma'></div>
				<h3>".$i->title."</h3>
				<strong>".substr($i->pubDate,0,22)."</strong>
				<p>".$i->description."</p>
				<div class='fb-comments' data-href='http://www.projectunknown.se/xmlapp/index.php?controller=fzxmlapp".$i->title."' data-num-posts='5' data-width='735'></div>
				
			</article>
			";
			
			$count++;
		}
		$xhtml .= "</section><div class='clear'></div>";
		
		return $xhtml;
	}
	
	public function GenerateFromAtom($xml)
	{
		//Not implemented
	}
	
	public function GetStyle()
	{
		$xhtml = "<link rel='Stylesheet' media='Screen' type='text/css' href='Assets/css/style.css'/>\n";
		return $xhtml;
	}   
}